
<form id="form_edit"><input type="hidden" name="id" value="{[$smarty.request.id]}" />
<table>
	<tr>
		<td  width="20%" align="right">流水号：</td>
		<td  width="30%">#{[$result.id]}({[$result.oper_t]})</td>
		<td  width="20%" align="right">状态：</td>
		<td  width="30%">{[$result.status_t]}</td>
	</tr>
	<tr>
		<td align="right">名称：</td>
		<td><input type="text" name="name" size="20" value="{[$result.name|default:'订购合同']}"></td>
		<td align="right">交货日期：</td>
		<td><input type="text" name="date" id="date" size="12" value="{[$result.date]}"></td>
	</tr>	
	<tr>
		<td align="right">客户：</td>
		<td><select name='customer' id='customer'>
			{[html_options options=$tecmold_option selected=$result.customer]}
		</select> <a href="javascript:void(0)"
			id="customer_x" onclick="Common.toggle(this, '#label_linkman_a')(this)" class="ui-icon ui-icon-circle-triangle-w"
			style="display: inline-table"></a></td>
		<td align="right">采购员：</td>
		<td><input type="text" name="emp" id="emp" size="12" value="{[$result.emp]}:{[$result.emp_t]}" title="{[$t.emp_|emp:'采购员']}"> <input
			type="checkbox" name="t_emp" id="t_emp" value="{[$smarty.session.id]}:{[$smarty.session.name]}" checked> 自己</td>
	</tr>
	<tr id="label_linkman_a">
		<td></td>
		<td colspan="3">{[include file="contact/customer/_linkman.tpl"]}</td>
	</tr>
	<tr>
		<td align="right">交货地点：</td>
		<td colspan="3"><textarea rows="2" name="address" id="address" cols="55">{[$result.address]}</textarea> <select name='address_t'
			id='address_t'>
			{[html_options options=$address_option selected=-]}
		</select></td>
	</tr>
	<tr>
		<td align="right">供应商：</td>
		<td colspan="3"><input type="text" name="supplier" id="supplier"
				value="{[$result.supplier]}:{[$result.supplier_t]}" size="20"
				title="{[$t.supplier]}"> <a href="javascript:void(0)" id="supplier_x"
			onclick="Common.toggle(this, '#label_linkman')" class="ui-icon ui-icon-circle-triangle-w" style="display: inline-table"></a></td>
	</tr>
	<tr id="label_linkman">
		<td></td>
		<td colspan="3">{[include file="_linkman.tpl"]}</td>
	</tr>
	<tr>
		<td align="right">税率：</td>
		<td><input type="text" name="tax" id="tax" size="8" value="{[$result.tax]}">（单位：%）</td>
		<td align="right">结算方式：</td>
		<td><input type="text" name="type" id="type" size="12" value="{[$result.type]}"> <select name='type_t' id='type_t'>
			{[html_options options=$type_option selected=-]}
		</select></td>
	</tr>	
	<tr>
		<td align="right">金额：</td>
		<td colspan="3"><input type="text" name="total" id="total" value="{[$result.total]}" size="12" disabled> <select name='currency'
			id='currency'>
			{[html_options options=$currency_option selected=$result.currency]}
		</select> <label id="label_amount"></label></td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><textarea rows="2" name="content" id="content" cols="55">{[$result.content]}</textarea></td>
	</tr>
</table>
</form>

<div style="margin-top: 10px; margin-bottom: 5px; width: 740px; float: left;">
<div id="myGrid" style="width:100%;height:160px;"></div>
</div>
<table border="0">
	<tr>
		<td width="530" align="right">合计：</td>
		<td width="80">
		<div id="total_t"></div>
		</td>
		<td width="60"></td>
		<td></td>
	</tr>
</table>

<script type="text/javascript" src="js/material/in/purchase/columns_edit.js?r={[$smarty.now]}"></script>

<script type='text/javascript'>
var data = {[$result.item]};
var exchange = {[$result.exchange]};
</script>

<script type="text/javascript" src="js/material/in/purchase/edit.js?r={[$smarty.now]}"></script>
